package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user2")
public class HelloController {

    @RequestMapping("test1")
    public String test1(){
        return "/test/test.html";
    }


    @RequestMapping("/test2")
    public String test2(){
        return "<h1>我是一级标题</h1>";
    }

    @ResponseBody
    @RequestMapping("/test3")
    public String test3(){
        return "<h1>我是一级标题</h1>";
    }

    @ResponseBody
    @RequestMapping(value = "/test4", produces = "text/plain")
    public String returnText(){
        return "<h1>我是一级标题</h1>";
    }

}
